<?
    session_start();
    error_reporting(E_ALL);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" media="all" href="css/style.css" />
<link type="text/css" rel="stylesheet" href="css/syronex-colorpicker.css" />
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery.json-2.3-min.js"></script>
<script type="text/javascript" src="js/chat-scripts.js"></script>
<script type="text/javascript" src="js/md5.js"></script>
<script type="text/javascript" src="js/syronex-colorpicker.js"></script>
<title>Чат LSC</title>
</head>
<body>
    <?php
        if(!isset($_SESSION['login'])): ?>
            <h1>Access denied</h1>
    <?  else:    ?>
   <div id="chat-exit">
       <a href="javascript:void(0)">[X] Выход</a>
   </div>
   <div id="chat-container">
        <div id="chat-left">
            <div id="online-label" class="chat-label">
                Онлайн
            </div>
            <select id="onlinePlayers" name="multi1[]" multiple="multiple" size="13">
               
            </select>
        </div>
        <div id="chat-right">
            <div class="chat-label">
                Настройки
            </div>
            <div class="post inactive">
		<div class="title">
                    <h3><a href="javascript:void(0)" title="">Параметры профиля</a></h3>
		</div>
		<div class="entry" style="display:none">
                    <form id="settings">
                        Ник: <input id="nickname" type="text" value="<?php echo $_COOKIE['login']; ?>"/><br/>
                        Цвет:
                        <div id="color-picker"></div>
                        <div id="output"></div>
                        <input type="submit" value="Сохранить"/>
                    </form>
		</div>
            </div>
            <?php if ($_SESSION['role']): ?>
            <div class="post inactive">
                <div class="title">
                    <h3><a href="javascript:void(0)" title="">Администрирование</a></h3>
                </div>
                <div class="entry" style="display:none">
                    <form id="invite">
                        <table>
                            <tr>
                            <td>Логин:</td>
                            <td><input id="invite-login" type="text"/></td>
                            </tr>
                            <tr>
                            <td>E-mail:</td> 
                            <td><input id="invite-mail" type="text"/></td>
                            </tr>
                            <tr>
                            <td>Админ?</td>
                            <td><input id="isAdmin" type="checkbox"/></td>
                            </tr>
                        </table>
                        <div id="error-window" style="display: none;"></div>
                        <input type="submit" value="Создать"/>
                    </form>
                </div>
            </div>
            <? endif; ?>
        </div>
        <div id="chat-content">
            <div class="chat-label">
                Чат
            </div>
            <div id="msg-wrapper">
                                
            </div>
            <form id="sendMsg">
                <input type="text" id="msg" autocomplete="off"/>
                <input type="submit" value="[      ]"/>
            </form>
        </div>
    </div>
    <? endif; ?>
</body>
</html>